# $Id$
# Maintainer: Ronald van Haren <ronald.archlinux.org>
# Contributor: Juergen Hoetzel <juergen.archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>

pkgname=gsl
pkgver=2.4
pkgrel=1
pkgdesc="The GNU Scientific Library (GSL) is a modern numerical library for C and C++ programmers"
url="http://www.gnu.org/software/gsl/gsl.html"
source=("http://ftp.gnu.org/gnu/gsl/$pkgname-$pkgver.tar.gz")
license=('GPL')
arch=('i686' 'x86_64')
depends=('glibc' 'bash')
sha1sums=('5db17d71306139b811a218d8a8cf98e12e1f58ae')

build() {
    unset LDFLAGS

    cd "${srcdir}/${pkgname}-${pkgver}"
    ./configure --prefix=/usr
    make
}

check() {
    [[ $CARCH = 'i686' ]] && return 0 # https://lists.gnu.org/archive/html/bug-gsl/2015-11/msg00011.html
    cd "${srcdir}/${pkgname}-${pkgver}"
    make check
}

package() {
    cd "${srcdir}/${pkgname}-${pkgver}"
    make DESTDIR="${pkgdir}" install
}
